package com.romotc.qqrobot.webqq.bean;

import com.romotc.json.tools.Jackson;
import com.romotc.qqrobot.bean.PollResult;

/**
 * http://d.web2.qq.com/channel/poll2 请求返回信息result内容对应Bean
 * 
 * @author Administrator "result": [ { "poll_type":"message", "value":
 *         {"msg_id":11028, "from_uin":1670433408, "to_uin":1586030808,
 *         "msg_id2":589200, "msg_type":9, "reply_ip":176752342,
 *         "time":1326529150,
 *         "content":[["font",{"size":13,"color":"000000","style":[0,0,0],"name":"\u9ED1\u4F53"}],"ddd "] } } ]
 */
public class Poll2_ResponseBody_Result {

	private String poll_type;
	private Poll2_ResponseBody_Result_Value value;

	public Poll2_ResponseBody_Result() {
		
	}
	public Poll2_ResponseBody_Result(PollResult pollObj) {
		if(pollObj != null)
		{
			this.poll_type = pollObj.getPoll_type();
			
			this.value = new Poll2_ResponseBody_Result_Value(pollObj);
		}
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

	public String getPoll_type() {
		return poll_type;
	}

	public void setPoll_type(String poll_type) {
		this.poll_type = poll_type;
	}

	public Poll2_ResponseBody_Result_Value getValue() {
		return value;
	}

	public void setValue(Poll2_ResponseBody_Result_Value value) {
		this.value = value;
	}
	@Override
	public String toString() {
		/**
						{"poll_type":"message",
							"value":{"msg_id":18012,"from_uin":2389297780,
						 			 "to_uin":1586030808,"msg_id2":578422,"msg_type":9,"reply_ip":176498388,
						    		 "time":1329017141,
						 			 "content":[["font",{"size":13,"color":"000000","style":[0,0,0],"name":"\u9ED1\u4F53"}],"9\u70B9 "]
									}
						}
		 */
		StringBuilder bld = new StringBuilder();
		bld.append("{");
		Jackson.appendValue(bld, "poll_type", this.poll_type);
		Jackson.appendStr(bld, "value").append(":{");
		return super.toString();
	}
	
	

}
